package cn.wolfcode.p2p.base.domain;

import cn.wolfcode.base.BaseDomain;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 所有审核认证的基类
 */
@Setter
@Getter
@Accessors(chain = true)
public class AuthBaseDomain extends BaseDomain {
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	// 审核状态常量
    public static final Integer STATE_WAIT = 0; // 待审核
    public static final Integer STATE_PASS= 1; // 通过
    public static final Integer STATE_REJECT= 2; // 拒绝

    /**
     * 审核状态(待审核/通过/拒绝)
     */
    protected int state;

    /**
     * 审核备注信息
     */
    protected String remark;

    /**
     * 审核时间
     */
    protected Date auditTime;

    /**
     * 申请时间
     */
    protected Date applyTime;

    /**
     * 审核人ID
     */
    protected LoginInfo auditor;

    /**
     * 申请人ID
     */
    protected LoginInfo applier;

    // 审核状态
    public String getDisplayState(){
        String displayState = "待审核";
        if (state == STATE_PASS){
            displayState = "通过";
        } else if (state == STATE_REJECT){
            displayState = "拒绝";
        }
        return displayState;
    }

}
